Manages the samplers available in the component. More...
Public Member Functions | |
| ~SamplerManager () | |
| Sampler * | createOrRetrieve (const nkMemory::StringView &name) |
| Sampler * | get (const nkMemory::StringView &name) |
| Sampler * | getByIndex (unsigned int id) |
| void | rename (const nkMemory::StringView &oldName, const nkMemory::StringView &newName) |
| void | erase (const nkMemory::StringView &name) |
Manages the samplers available in the component.
The manager owns all memory returned. External code should never delete it.
| nkGraphics::SamplerManager::~SamplerManager | ( | ) |
Destructor.
| Sampler* nkGraphics::SamplerManager::createOrRetrieve | ( | const nkMemory::StringView & | name | ) |
Creates if unavailable, or retrieves if available, a sampler.
| name | The name of the sampler to use. |
| Sampler* nkGraphics::SamplerManager::get | ( | const nkMemory::StringView & | name | ) |
Retrieves an existing sampler.
| name | The name of the sampler to retrieve. |
| Sampler* nkGraphics::SamplerManager::getByIndex | ( | unsigned int | id | ) |
Retrieves a sampler by index. Note that an index can return a different sampler if the internal memory is modified. Mainly used for looping over all available samplers in one go.
| id | The index to use. |
| void nkGraphics::SamplerManager::rename | ( | const nkMemory::StringView & | oldName, |
| const nkMemory::StringView & | newName | ||
| ) |
Renames a sampler, changing both its name and way of addressing it in the manager.
| oldName | The name of the sampler to move. |
| newName | The new name to assign to the sampler. |
| void nkGraphics::SamplerManager::erase | ( | const nkMemory::StringView & | name | ) |
Erases a sampler and frees its memory.
| name | The name of the sampler to erase. |